/*
 * 铁路道岔故障检测信息管理系统
 * Design by 魏梓晟
 * Version :1.0
 */
package com.railway.switchs.domain.dto.business;

import java.io.Serializable;

import com.railway.switchs.domain.pojo.business.RepairTaskPojo;
import com.railway.switchs.enums.EnumDeviceType;
import com.railway.switchs.enums.EnumRepairLevel;
import com.railway.switchs.enums.EnumRepairType;
import com.railway.switchs.utils.StringUtil;
import lombok.Data;
/**
 * repair_task - 检修任务信息表 实体类
 * 
 * @author 魏梓晟
 */
@Data
public class RepairTask extends RepairTaskPojo implements Serializable {

    private static final long serialVersionUID = 1L;
	
	public RepairTask(){

    }

    public RepairTask(Long id){
        this.setId(id);
    }

    private String closeTimeStr;

	private String finishTimeStr;

	private String repairLevelDesc;

	private String taskTypeDesc;

    private String supervisorName;

    private String repairmanName;

    private String repairPlaceDesc;

    public String getRepairPlaceDesc(){
        if(StringUtil.isEmpty(getRepairPlace())){
            return "";
        }
        return EnumDeviceType.getName(getRepairPlace());
    }

    public String getRepairLevelDesc(){
        if(StringUtil.isEmpty(getRepairLevel())){
            return "";
        }
        return EnumRepairLevel.getName(getRepairLevel());
    }

    public String getTaskTypeDesc(){
        if(StringUtil.isEmpty(getTaskType())){
            return "";
        }
        return EnumRepairType.getName(getTaskType());
    }
}
